package com.unknowpupil.oauth2.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.unknowpupil.oauth2.domain.TbUser;
import com.unknowpupil.oauth2.mapper.TbUserMapper;
import com.unknowpupil.oauth2.service.ITbUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;


/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author AutoGenerator
 */
@Service
public class TbUserServiceImpl extends ServiceImpl<TbUserMapper, TbUser>implements ITbUserService {

    @Override
    public TbUser getByUsername(String username) {

        TbUser tbUser = baseMapper.selectOne(new LambdaQueryWrapper<TbUser>().eq(TbUser::getUsername, username));
        return tbUser;
    }
}
